<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>SLSystem</title>
    <meta name="keywords" content="面向学习型的开源框架，简洁高效，杜绝过渡封装，展现技术本质本质">
    <meta name="description" content="面向学习型的开源框架，简洁高效，杜绝过渡封装，展现技术本质本质">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/bootstrap-select.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm" th:action="@{/healthinfo/edit}" th:object="${healthinfo}" method="post">

                        <input id="id" name="id" th:value="${healthinfo.id}" class="form-control" type="hidden">
                        <input id="userId" name="userId" th:value="${healthinfo.userId}" class="form-control" type="hidden">
                        <input id="makeDate" name="makeDate" th:value="${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd')}" class="form-control" type="hidden">
                        <input id="makeTime" name="makeTime" th:value="${#dates.format(new java.util.Date().getTime(), 'hh:mm:ss')}" class="form-control" type="hidden">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">身高:</label>
                            <div class="col-sm-8">
                                <input id="userHight" name="userHight" th:value="${healthinfo.userHight}"
                                       class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">体重:</label>
                            <div class="col-sm-8">
                                <input id="userWeight" name="userWeight" th:value="${healthinfo.userWeight}"
                                       class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">血压（高压）:</label>
                            <div class="col-sm-8">
                                <input id="highBlood" name="highBlood" th:value="${healthinfo.highBlood}"
                                       class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">血压（低压）:</label>
                            <div class="col-sm-8">
                                <input id="lowBlood" name="lowBlood" th:value="${healthinfo.lowBlood}"
                                       class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">视力：</label>
                            <div class="col-sm-8">
                                <input id="sight" name="sight" th:value="${healthinfo.sight}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">体质(若您不清楚自身体质请先进行体质检测):</label>
                            <div class="col-sm-8">
                                <select name="bodyType" id="bodyType" data-live-search="true"
                                        class="form-control chosen-select selectpicker" tabindex="2" required>
                                    <option th:each="bodytype:${bodytypes}"
                                            th:value="${bodytype.code}"
                                            th:text="${bodytype.code}+'--'+${bodytype.CodeName}"
                                           th:selected="${healthinfo.bodyType==bodytype.code}">
                                    </option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" id="submit" class="btn btn-primary">修改</button>
                                <a type="button" class="btn btn-primary" th:href="@{/toHealthRecord}">返回</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
<script src="/js/bootstrap.min.js?v=3.3.6" th:src="@{/js/bootstrap.min.js?v=3.3.6}"></script>
<script src="/js/bootstrap-select.js?v=3.3.6" th:src="@{/js/bootstrap-select.js?v1.6.3}"></script>
<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js"></script>

<!-- 自定义js -->
<script src="/js/content.js?v=1.0.0" th:src="@{/js/content.js?v=1.0.0}"></script>

<!-- jQuery Validation plugin javascript-->
<script src="/js/ajax-util.js"></script>
<script src="/js/plugins/validate/jquery.validate.min.js" th:src="@{/js/plugins/validate/jquery.validate.min.js}"></script>
<script src="/js/plugins/validate/messages_zh.min.js" th:src="@{/js/plugins/validate/messages_zh.min.js}"></script>
<script src="/js/plugins/layer/layer.min.js" th:src="@{/js/plugins/layer/layer.min.js}"></script>

<!-- 自定义js方法 -->
<script type="text/javascript">
    $(document).ready(function () {
        $(".selectpicker").selectpicker({
            'selectedText': 'cat'
        });
    });

    //检查邮箱格式
    // function checkEmail(email) {
    //     //邮箱正则表达式
    //     var myReg=/^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/;
    //     if(myReg.test(email)){
    //         return true;
    //     }else{
    //         return false;
    //     }
    // }

    //提交编辑学生
    $(document).ready(function(){
        $("#submit").on("click",function(){

            // //校验用户名
            // var name = $('#name').val().trim();
            // if(name==null || name==''){
            //     layer.msg("请输入正确的姓名");
            //     return false;
            // }

            // //校验用户名
            // var idCardNo = $('#idCardNo').val().trim();
            // if(idCardNo==null || idCardNo==''){
            //     layer.msg("请输入正确的证件号");
            //     return false;
            // }

            // //校验证件号长度
            // if(idCardNo.length<6){
            //     layer.msg("证件号长度至少6位，请重新输入");
            //     return false;
            // }

            //校验用户名
            // var gradeId = $('#gradeId').val().trim();
            // if(gradeId==null || gradeId==''){
            //     layer.msg("请选择院系班级");
            //     return false;
            // }

            //校验用户名
            // var email = $('#email').val().trim();
            // if(email==null || email==''){
            //     layer.msg("请输入正确的邮箱");
            //     return false;
            // }else if(!checkEmail(email)){
            //     layer.msg("邮箱格式不正确，请重新填写");
            //     return false;
            // }

        })

    });

</script>

</body>
</html>